package com.maimao.model.kill;

import lombok.*;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 秒杀接口暴露实体
 *
 * @author MaoLin Wang
 * @date 2021/4/13 3:53 下午
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class KillInterfaceExposer {

    /**
     * 秒杀id
     */
    private Long killId;

    /**
     * 接口md5加密 每个商品针对每个用户定制化秒杀接口地址
     */
    private String md5;

    /**
     * 秒杀是否开始
     */
    private boolean start;

    /**
     * 秒杀开始时间
     */
    private long startTime;

    /**
     * 秒杀结束时间
     */
    private long endTime;

    /**
     * 系统当前时间
     */
    private long now;

    @Override
    public String toString() {
        return "KillInterfaceExposer{" +
                "killId=" + killId +
                ", md5='" + md5 + '\'' +
                ", start=" + start +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", now=" + now +
                '}';
    }
}
